using RawRestructure.Enums;

namespace RawRestructure.Models;

/// <summary>
/// 存储分批发送信息的数据结构
/// </summary>
public class BatchInfo
{
    /// <summary>
    /// 起始索引
    /// </summary>
    public int StartIndex { get; set; }

    /// <summary>
    /// 批次长度
    /// </summary>
    public int Length { get; set; }

    /// <summary>
    /// 是否为最终确认批次
    /// </summary>
    public bool IsLastBatch { get; set; }

    /// <summary>
    /// 命令类型
    /// </summary>
    public CommandType CommandType { get; set; }

    /// <summary>
    /// 批次号
    /// </summary>
    public int BatchNumber { get; set; }

    /// <summary>
    /// 是否为最终确认批次（发送全部数量）
    /// </summary>
    public bool IsConfirmationBatch => IsLastBatch;

    /// <summary>
    /// 批次描述信息
    /// </summary>
    public string Description => $"批次{BatchNumber}: 索引{StartIndex}-{StartIndex + Length - 1} ({Length}张) [{CommandType}]";
} 